﻿public partial class Shared_UserControl_InfoPanelNoValidation : AdminBaseUserControl
{
    protected override void OnLoad(System.EventArgs e)
    {
        errorPanel.Visible = successPanel.Visible = false;
        errli.Text = succli.Text = string.Empty;
        base.OnLoad(e);
    }

    public void AddErrorInfo(string message)
    {
        errorPanel.Visible = true;
        if (!string.IsNullOrEmpty(errli.Text))
            errli.Text += "<br/>";
        errli.Text += message;
        AddScriptM(string.Format("$('#{0}').delay(2000).hide('slow');", errorPanel.ClientID));
    }

    public void AddSuccessInfo(string message)
    {
        successPanel.Visible = true;
        succli.Text = message;
        AddScriptM(string.Format("$('#{0}').delay(2000).hide('slow');", successPanel.ClientID));
    }
}